home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / interapplication comm / 7edit / source / sveditaeutils.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.1 KB  |  63 lines

  1. /*
  2.     File:        SVEditAEUtils.h
  3.  
  4.     Contains:    
  5.  
  6.     Written by: Original version by Jon Lansdell and Nigel Humphreys.
  7.                             3.1 updates by Greg Sutton.    
  8.  
  9.     Copyright:    Copyright ©1995-1999 by Apple Computer, Inc., All Rights Reserved.
  10.  
  11.                 You may incorporate this Apple sample source code into your program(s) without
  12.                 restriction. This Apple sample source code has been provided "AS IS" and the
  13.                 responsibility for its operation is yours. You are not permitted to redistribute
  14.                 this Apple sample source code as "Apple sample source code" after having made
  15.                 changes. If you're going to re-distribute the source, we require that you make
  16.                 it clear in the source that the code was descended from Apple sample source
  17.                 code, but that you've made changes.
  18.  
  19.     Change History (most recent first):
  20.                 7/19/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  21.                 
  22.  
  23. */
  24.  
  25. #include <Types.h>
  26. #include <Quickdraw.h>
  27. #include <Packages.h>
  28. #include <GestaltEqu.h>
  29. #include <Editions.h>
  30. #include <Printing.h>
  31. #include <AppleEvents.h>
  32. #include <ToolUtils.h>
  33.  
  34. #ifndef __SVEDITAEUTILS__
  35. #define __SVEDITAEUTILS__
  36.  
  37. #include "SVToken.h"
  38.  
  39.     // Utility Routines for getting data from AEDesc's
  40.     
  41. void     GetRawDataFromDescriptor(const AEDesc *theDesc, Ptr destPtr,
  42.                                             Size destMaxSize, Size *actSize);
  43.                                                                          
  44. OSErr    GetPStringFromDescriptor(const AEDesc *aDesc, StringPtr resultStr);
  45. OSErr    PutPStringToDescriptor(AEDesc* aDesc, StringPtr pStr);
  46. OSErr    GetIntegerFromDescriptor(const AEDesc *sourceDesc, short *result);
  47. OSErr    GetBooleanFromDescriptor(const AEDesc *sourceDesc, Boolean *result);
  48. OSErr    GetLongIntFromDescriptor(const AEDesc *sourceDesc, long   *result);
  49. OSErr    GetRectFromDescriptor(const AEDesc *sourceDesc, Rect *result);
  50. OSErr    GetPointFromDescriptor(const AEDesc *sourceDesc, Point  *result);
  51. OSErr    GetEnumeratedFromDescriptor(const AEDesc *sourceDesc, DescType  *result);
  52.  
  53.     // Parameter routines
  54.  
  55. OSErr        GotRequiredParams(const AppleEvent *theAppleEvent);
  56. OSErr        AddResultToReply(AEDesc* result, AEDesc* reply, OSErr error);
  57.  
  58.     // Routine so events can be sent to self
  59.  
  60. OSErr        MakeSelfAddress(AEAddressDesc *selfAddress);
  61.  
  62.  
  63. #endif